package com.demo.service;

import com.demo.entity.Oil;
import com.demo.entity.Speed;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;


public interface OilService {


    ArrayList<Map<String, Object>> getOilFieldListWithLocation();

    Oil getLatestInfo(String oil_field, String eui);

    List<Oil> getLatestDataByOilField(String oil_field);

    List<Oil> getDataByOilFieldAndNode(String oil_field, String eui);

    void updateWiFiStatusByFieldAndNode(String oil_field, String eui, boolean wifi_status);
//    String insertWiFiStatusByFieldAndNode(String oil_field, String eui, String time, boolean wifi_status);

    int getNodeFaultByFieldAndNode(String oil_field, String eui);

    List<Oil> getLatestDataByFieldAndNodeAndFault(String oil_field, String eui, Integer node_status);

    int countOilFields();

    List<Map<String, Object>> getNodeCountByOilField();

    int counteuis();

    List<Map<String, Object>> getNodeCountsByFault();

    Integer getTotalNormalNodeCount();

    Integer getTotalFaultNodeCount();

    List<Oil> getFaultInfo(String oil_field, boolean node_fault);

}
